home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / ANIMAP.H < prev    next >
C/C++ Source or Header  |  1993-02-21  |  2KB  |  54 lines

  1. #ifndef ANIMAP.H
  2.  
  3. #define ANIMAP.H
  4.  
  5. #include "stddefs.h"
  6. #include "animicon.h"
  7.  
  8. class animactor;
  9.  
  10. class animapSquare : public animslave
  11. {
  12.   public:
  13.   byte myIconNumber, myTerrainType;
  14.   int refresh; //should we refresh this square??
  15.   animactor * nextActor;
  16.   animapSquare() : animslave() {thisFrame = NULL; nextActor = NULL; myIconNumber = myTerrainType = 0;};
  17.   inline void display(int x, int y, word pageBase, int squareWidth);
  18.   virtual void advance(void);
  19.   void drawActors(int x, int y, word pageBase);
  20. };
  21.  
  22. typedef char fileNameString[15];
  23.  
  24. class animap
  25. {
  26.   public:
  27.   byte squareWidth;
  28.   word width, height;
  29.   word numIcons;
  30.   int lastScreenX, lastScreenY; //last pixel at which plotting started
  31.   int lastMapX, lastMapY; //last map square at which plotting started
  32.   int lastDrawWidth, lastDrawHeight; //width and height of last draw
  33.   animapSquare * * mapData;
  34.   animicon * iconTable;
  35.   fileNameString * iconNames;
  36.   animap(int numicons, int squidth, int iwidth, int iheight);
  37.   animap(char * filename, yakLib * myYakLib = NULL); //loads and constructs map!
  38.   ~animap();
  39.   void * isInSquare(int x, int y, byte identity);
  40.   void draw(int centerx, int centery, int screenx, int screeny, int radx,int rady, word offset);
  41.   void show(int centerx, int centery, int screenx, int screeny, int radx,int rady, word offset);
  42.   void drawXY(int left, int top, int screenLeft, int screenTop, int width,int height, word offset);
  43.   void showXY(int left, int top, int screenLeft, int screenTop, int width,int height, word offset);
  44.   void smartRefresh(int deltaX, int deltaY, word offset);
  45.   void advance(void);
  46.   void loadIcon(int position, char * filename, yakLib * myYakLib = NULL);
  47.   void save(char * filename);
  48.   void load(char * filename);
  49.   void setSquare(word x, word y, byte icon_number);
  50.   void reset(void);
  51.   void randomize(void);
  52. };
  53.  
  54. #endif